﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;

public partial class TrangQuanLy : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Panel1.Visible = false;
        if (Session["idadmin"].ToString() != "")
        {
            try
            {

                Label2.Text = "Tên truy cập: " + Convert.ToString(Session["idadmin"].ToString());
                Panel1.Visible = true;
            }
            catch
            {

            }
        }

        if (Session["idadmin"].ToString() == "")// Neu chua dang nhap voi tai khoan admin chuyen ve trang chu
        {
            Response.Redirect("index.aspx");
        }
      

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        Session["idadmin"]= "";
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        Response.Redirect("index.aspx");
    }
}
